\(\int \frac {1}{\sqrt {a+b \sec (e+f x)}} \, dx\) [253]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 14, antiderivative size = 106 \[ \int \frac {1}{\sqrt {a+b \sec (e+f x)}} \, dx=-\frac {2 \sqrt {a+b} \cot (e+f x) \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{a f} \]

[Out]

-2*cot(f*x+e)*EllipticPi((a+b*sec(f*x+e))^(1/2)/(a+b)^(1/2),(a+b)/a,((a+b)/(a-b))^(1/2))*(a+b)^(1/2)*(b*(1-sec
(f*x+e))/(a+b))^(1/2)*(-b*(1+sec(f*x+e))/(a-b))^(1/2)/a/f

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3869} \[ \int \frac {1}{\sqrt {a+b \sec (e+f x)}} \, dx=-\frac {2 \sqrt {a+b} \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{a f} \]

[In]

Int[1/Sqrt[a + b*Sec[e + f*x]],x]

[Out]

(-2*Sqrt[a + b]*Cot[e + f*x]*EllipticPi[(a + b)/a, ArcSin[Sqrt[a + b*Sec[e + f*x]]/Sqrt[a + b]], (a + b)/(a -
b)]*Sqrt[(b*(1 - Sec[e + f*x]))/(a + b)]*Sqrt[-((b*(1 + Sec[e + f*x]))/(a - b))])/(a*f)

Rule 3869

Int[1/Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[2*(Rt[a + b, 2]/(a*d*Cot[c + d*x]))*Sqrt[b
*((1 - Csc[c + d*x])/(a + b))]*Sqrt[(-b)*((1 + Csc[c + d*x])/(a - b))]*EllipticPi[(a + b)/a, ArcSin[Sqrt[a + b
*Csc[c + d*x]]/Rt[a + b, 2]], (a + b)/(a - b)], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 \sqrt {a+b} \cot (e+f x) \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{a f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.39 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.30 \[ \int \frac {1}{\sqrt {a+b \sec (e+f x)}} \, dx=-\frac {4 \cos ^2\left (\frac {1}{2} (e+f x)\right ) \sqrt {\frac {\cos (e+f x)}{1+\cos (e+f x)}} \sqrt {\frac {b+a \cos (e+f x)}{(a+b) (1+\cos (e+f x))}} \left (\operatorname {EllipticF}\left (\arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right ),\frac {a-b}{a+b}\right )-2 \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right ),\frac {a-b}{a+b}\right )\right ) \sec (e+f x)}{f \sqrt {a+b \sec (e+f x)}} \]

[In]

Integrate[1/Sqrt[a + b*Sec[e + f*x]],x]

[Out]

(-4*Cos[(e + f*x)/2]^2*Sqrt[Cos[e + f*x]/(1 + Cos[e + f*x])]*Sqrt[(b + a*Cos[e + f*x])/((a + b)*(1 + Cos[e + f
*x]))]*(EllipticF[ArcSin[Tan[(e + f*x)/2]], (a - b)/(a + b)] - 2*EllipticPi[-1, ArcSin[Tan[(e + f*x)/2]], (a -
 b)/(a + b)])*Sec[e + f*x])/(f*Sqrt[a + b*Sec[e + f*x]])

Maple [A] (verified)

Time = 5.25 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.39

method result size
default \(\frac {2 \left (\cos \left (f x +e \right )+1\right ) \left (\operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right )-2 \operatorname {EllipticPi}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), -1, \sqrt {\frac {a -b}{a +b}}\right )\right ) \sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {a +b \sec \left (f x +e \right )}}{f \left (b +a \cos \left (f x +e \right )\right )}\) \(147\)

[In]

int(1/(a+b*sec(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/f*(cos(f*x+e)+1)*(EllipticF(cot(f*x+e)-csc(f*x+e),((a-b)/(a+b))^(1/2))-2*EllipticPi(cot(f*x+e)-csc(f*x+e),-1
,((a-b)/(a+b))^(1/2)))*(1/(a+b)*(b+a*cos(f*x+e))/(cos(f*x+e)+1))^(1/2)*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*(a+b*
sec(f*x+e))^(1/2)/(b+a*cos(f*x+e))

Fricas [F]

\[ \int \frac {1}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { \frac {1}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]

[In]

integrate(1/(a+b*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

integral(1/sqrt(b*sec(f*x + e) + a), x)

Sympy [F]

\[ \int \frac {1}{\sqrt {a+b \sec (e+f x)}} \, dx=\int \frac {1}{\sqrt {a + b \sec {\left (e + f x \right )}}}\, dx \]

[In]

integrate(1/(a+b*sec(f*x+e))**(1/2),x)

[Out]

Integral(1/sqrt(a + b*sec(e + f*x)), x)

Maxima [F]

\[ \int \frac {1}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { \frac {1}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]

[In]

integrate(1/(a+b*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(1/sqrt(b*sec(f*x + e) + a), x)

Giac [F]

\[ \int \frac {1}{\sqrt {a+b \sec (e+f x)}} \, dx=\int { \frac {1}{\sqrt {b \sec \left (f x + e\right ) + a}} \,d x } \]

[In]

integrate(1/(a+b*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate(1/sqrt(b*sec(f*x + e) + a), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {a+b \sec (e+f x)}} \, dx=\int \frac {1}{\sqrt {a+\frac {b}{\cos \left (e+f\,x\right )}}} \,d x \]

[In]

int(1/(a + b/cos(e + f*x))^(1/2),x)

[Out]

int(1/(a + b/cos(e + f*x))^(1/2), x)